package belf.migrate.evaluate.model;

import lombok.Data;

import java.util.HashMap;
import java.util.Map;

@Data
public class EvaluateRiskResult {

    private Map<String, Integer> columnRisk = new HashMap<>();

    private Map<String, Integer> funcRisk = new HashMap<>();

    public void addColumnRisk(String columnName) {
        if (columnRisk.containsKey(columnName)) {
            columnRisk.put(columnName, columnRisk.get(columnName) + 1);
        } else {
            columnRisk.put(columnName, 1);
        }
    }

    public void addFuncRisk(String funcName) {
        if (funcRisk.containsKey(funcName)) {
            funcRisk.put(funcName, funcRisk.get(funcName) + 1);
        } else {
            funcRisk.put(funcName, 1);
        }
    }
}
